<?php

/**
 * Created by PhpStorm.
 * User: YUWENXUAN
 * Date: 2017/4/7
 * Time: 15:48
 */
class Person
{
    protected $age = 18;

    public function __toString()
    {
        return '类名是'.__CLASS__;
    }

    /**
     * @return int
     */
    public function getAge(): int
    {
        return $this->age;
    }

    /**
     * @param int $age
     */
    public function setAge(int $age)
    {
        $this->age = $age;
    }

//    public function __get($name)
//    {
//        return $this->$name;
//    }

}